# -*- coding:utf-8 -*-
import time
import pymongo,os


client = pymongo.MongoClient('localhost',27017)
jdly = client['jdly']
table_img = jdly['img_list']
table_index  = jdly['page_list']
table_page = jdly['page']
table_img = jdly['img_url']
while True:
    listfile = os.listdir('./img')
    print('当前数据:')
    print('当前页数: %s 条' % (table_page.find().count()))

    print('当前图集: %s 条' % (table_index.find().count()))
    print('总共图片 %s 张/ 已下载 %s 张,剩余 %s 张' % (table_img.find().count(),len(listfile),table_img.find().count()-len(listfile)))
    time.sleep(15)